In js, there is one equals sign, two equals signs, three equals signs, one is a value equals sign, and the other is a comparison equals sign. So what is the use of the three equals signs, next, I will introduce three equal signs.
Sometimes we can
An equal sign is the function of assigning values. The main problem is the difference between two and three equal signs. Many friends may not know it, there is a good example in this article, which mainly describes the differences between the two.
1 Why should you judge?Some students may see this title will be puzzled, why we have to determine whether the two variables in JavaScript is equal, JavaScript is not already provided with the double equals "= =" and the three equals "= = =" To us
An equal sign is a value assignment. The main problem is the difference between two and three equal signs.The difference between two equal signs and three equal signs in javaScriptIn a word: = convert the type before comparison, = first judge the
Determine whether two variables are equalProgramVery important computation in design. This operation is quite simple when processing the original value, but it is a little complicated to design the object. Javascript provides two sets of operators
Determining whether two variables are equal is a very important operation in programming. When processing the original value, this operation is quite simple, but the task is a little complicated when it involves objects.
Ecmascript provides two sets
Equals () reflects the specific value of an object or variable, which is the value contained within two objects-either a reference to an object or a value of a value type.Hashcode () is a hash value that is computed by the object or variable through
Differences between two equal signs and three equal signs in JS
14:14:09| Category:Javascript|Font Size Subscription First, = equal ity equals, === identity constant.
=, When the value types on both sides are different, type conversion should be
First, let's give a brief introduction to give you an intuitive understanding.
= Equality === identity equality
= When the value types on both sides are different, type conversion should be performed first and then comparison should be made.===
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.